const express = require('express');
const router = express.Router();
const petController = require('../controllers/petController');
const auth = require('../middlewares/auth');

// All pet routes require authentication
router.use(auth);

// Pet management routes
router.post('/', petController.adoptPet);
router.get('/', petController.getPets);
router.get('/candidates', petController.getPetCandidates);
router.get('/my-pet', petController.getMyPet);
router.get('/:id', petController.getPet);
router.put('/:id', petController.updatePet);
router.post('/:id/feed', petController.feedPet);
router.post('/:id/train', petController.trainPet);
router.post('/:id/recover-energy', petController.autoRecoverEnergy);
router.post('/:id/mint', petController.mintNFT);

// 弃养宠物
router.delete('/:id', petController.abandonPet);

module.exports = router; 